agents.anac.y2010.Southampton.utils
Class OpponentModel

java.lang.Object
  extended by agents.bayesianopponentmodel.OpponentModel
      extended by agents.anac.y2010.Southampton.utils.OpponentModel

public class OpponentModel
extends OpponentModel

Author:
Colin Williams

Nested Class Summary
static class OpponentModel.Extreme
           
 
Field Summary
 
Fields inherited from class agents.bayesianopponentmodel.OpponentModel
fBiddingHistory, fDomain
 
Constructor Summary
OpponentModel(UtilitySpace utilitySpace)
          Default constructor.
 
Method Summary
protected  void findMinMaxUtility()
          Find the minimum and maximum utilities of the bids in the utility space.
 EvaluatorHypothesis getBestHypothesis(int issue)
           
 double getExpectedUtility(Bid bid)
          Get the expected utility of a bid.
 double getExpectedWeight(int number)
          Get the expected weight of a particular issue.
 double getExtremeEvaluation(Evaluator evaluator, OpponentModel.Extreme extreme)
           
 Bid getFirstBid()
          Get the first bid.
 Hypothesis getHypothesis(int index)
           
 double getNormalizedUtility(Bid bid)
          Get the normalised utility of a bid.
 double getNormalizedUtility(Bid bid, boolean debug)
          Get the normalised utility of a bid.
 void printBestHypothesis()
          Print the best hypothesis.
 void updateBeliefs(Bid opponentBid, long currentTime, double totalTime)
          Update the beliefs about the opponent, based on an observation.
 
Methods inherited from class agents.bayesianopponentmodel.OpponentModel
getDomain, haveSeenBefore, isCrashed, updateBeliefs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpponentModel

public OpponentModel(UtilitySpace utilitySpace)
Default constructor.

Parameters:
utilitySpace - The utility space of the agent.
agent - The agent (used only for logging purposes).
Method Detail

getNormalizedUtility

public double getNormalizedUtility(Bid bid)
                            throws java.lang.Exception
Get the normalised utility of a bid.

Overrides:
getNormalizedUtility in class OpponentModel
Parameters:
bid - The bid to get the normalised utility of.
Returns:
the normalised utility of a bid.
Throws:
java.lang.Exception

getNormalizedUtility

public double getNormalizedUtility(Bid bid,
                                   boolean debug)
                            throws java.lang.Exception
Get the normalised utility of a bid.

Parameters:
bid - The bid to get the normalised utility of.
debug - Whether or not to output debugging information
Returns:
the normalised utility of a bid.
Throws:
java.lang.Exception

getExpectedUtility

public double getExpectedUtility(Bid bid)
                          throws java.lang.Exception
Get the expected utility of a bid.

Overrides:
getExpectedUtility in class OpponentModel
Parameters:
bid - The bid to get the expected utility of.
Returns:
the expected utility of the bid.
Throws:
java.lang.Exception

updateBeliefs

public void updateBeliefs(Bid opponentBid,
                          long currentTime,
                          double totalTime)
                   throws java.lang.Exception
Update the beliefs about the opponent, based on an observation.

Parameters:
opponentBid - The opponent's bid that was observed.
Throws:
java.lang.Exception

findMinMaxUtility

protected void findMinMaxUtility()
                          throws java.lang.Exception
Find the minimum and maximum utilities of the bids in the utility space.

Overrides:
findMinMaxUtility in class OpponentModel
Throws:
java.lang.Exception

getExtremeEvaluation

public double getExtremeEvaluation(Evaluator evaluator,
                                   OpponentModel.Extreme extreme)

getExpectedWeight

public double getExpectedWeight(int number)
Get the expected weight of a particular issue.

Overrides:
getExpectedWeight in class OpponentModel
Parameters:
number - The issue number.
Returns:
the expected weight of a particular issue.

printBestHypothesis

public void printBestHypothesis()
Print the best hypothesis.


getBestHypothesis

public EvaluatorHypothesis getBestHypothesis(int issue)

getFirstBid

public Bid getFirstBid()
Get the first bid.

Returns:
the first bid.

getHypothesis

public Hypothesis getHypothesis(int index)